<%
# Copyright (C) 2011 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>

<%
  content_for :page_title,  @event.title || t(:page_title, "New Calendar Event")
  return_to_url = return_to_calendar(:context => @context, :event => @event)

  event_attrs = {
    :id => @event.id,
    :context_code => @context.asset_string,
    :return_to_url => return_to_url
  }
  if @context.is_a? Course
    event_attrs[:sections_url] = context_url(@context, :api_v1_context_sections_url)
  end
  js_env :CALENDAR_EVENT => event_attrs

  js_bundle :edit_calendar_event
  css_bundle :tinymce, :edit_calendar_event_full
  content_for :right_side, render(:partial => 'shared/wiki_sidebar')
%>
